#ifndef _StringList_H
#define _StringList_H

#define  MAPSLOTSCOUNT 6151

class CStringList{
public:
	CStringList();
	~CStringList();
	size_t  getIndexByString(const char* String);
	const char* getStringByIndex(size_t Index);
private:
	int getHash(const char* Key);
	inline int getSlotIndex(const char* Key)
	{
		size_t Hash = getHash(Key);
		return (int)(Hash % MAPSLOTSCOUNT);
	}

	struct ListSlot{
		ListSlot(const char* String, size_t Index, ListSlot* NextSlot, ListSlot** LastSlot, CStringList& Base);
		~ListSlot();
		char*     _String;
		size_t    _Strlen;
		size_t    _Index;
		ListSlot* _Next;
		ListSlot* _NextByIndex;
	};

	ListSlot* _Slots[MAPSLOTSCOUNT];
	size_t    _Count;
	ListSlot* _FirstSlot;
	ListSlot* _LastSlot;

	size_t    _CharsCount;
};

#endif /* _StringList_H */